<div class="layui-card layadmin-header">
    <div class="layui-breadcrumb" lay-filter="breadcrumb">
        <a lay-href="">主页</a>
    </div>
</div>
<div class="layui-fluid">
    <div class="layui-card">
        <div class="layui-form layui-card-header layuiadmin-card-header-auto" lay-filter="layuiadmin-search-form">
            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label">昵称</label>
                    <div class="layui-input-block">
                        <input type="text" name="nickname" placeholder="请输入" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-inline">
                    <button class="layui-btn layuiadmin-btn-comm" data-type="reload" lay-submit
                            lay-filter="layuiadmin-search-form-btn">
                        <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
                    </button>
                </div>
            </div>
        </div>
        <!--        <div class="layui-card-header layuiadmin-card-header-auto">-->
        <!--            <button class="layui-btn layuiadmin-btn" data-type="add">添加</button>-->
        <!--        </div>-->
        <div class="layui-card-body">
            <table id="layuiadmin-table" lay-filter="layuiadmin-table"></table>
            <script type="text/html" id="layuiadmin-app-btns">
                <a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="edit"><i
                        class="layui-icon layui-icon-edit"></i>编辑</a>              <a
                        class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del"><i
                        class="layui-icon layui-icon-delete"></i>删除</a>
            </script>
        </div>
    </div>
</div>
<script>
    layui.use(['admin', 'table', 'helper', 'baseTable'], function () {
        var $           = layui.$
            , admin     = layui.admin
            , setter    = layui.setter
            , view      = layui.view
            , table     = layui.table
            , helper    = layui.helper
            , baseTable = layui.baseTable
            , form      = layui.form;
        var config      = {
            requestUrl: '/app/member-index'
            , formTemplate: '---member/index-edit'
            , tableCols   : [{
                field  : 'id'
                , width: 50
                , title: 'ID'
            }, {
                field     : 'user_avatar'
                , title   : '头像'
                , width: 70
                , templet:function(d){
                    return '<img src="' + d.user_avatar + '" />';
                }
            }, {
                field     : 'name'
                , title   : '姓名'
                , minWidth: 100
            }, {
                field     : 'number'
                , title   : '工号'
                , width: 70
            }, {
                field     : 'ticket_put'
                , title   : '已投'
                , width: 100
            }, {
                field     : 'ticket'
                , title   : '获得票数'
                , width: 150
            }, {
                field     : 'platform'
                , title   : '平台'
                , width: 120
                , templet:function(d){
                    return d.platform + '-V' + d.version
                }
            }, {
                field     : 'state'
                , title   : '状态'
                , width: 60
            }, {
                field     : 'update_time'
                , title   : '最后更新时间'
                , width: 150
            }, {
                field     : 'create_time'
                , title   : '添加时间'
                , width: 150
            }, {
                title    : '操作'
                , width  : 150
                , align  : 'center'
                , fixed  : 'right'
                , toolbar: '#layuiadmin-app-btns'
            }]
            , areaWidth   : 450
            , areaHeight  : 600
            ,
        };
        baseTable.render(config);
    });
</script>